This is mostly useful for fallback testing.
I suppose if people want finer grained GL ability testing, they can use
Mesa environment variables to tune things.
<term>misc</term>
<listitem><para>Miscellaneous information</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>nogl</term>
+ <listitem><para>Turn off OpenGL. GDK will behave as if OpenGL support was not available.</para></listitem>
+ </varlistentry>
<varlistentry>
<term>nograbs</term>
<listitem><para>Turn off all pointer and keyboard grabs</para></listitem>
{"eventloop", GDK_DEBUG_EVENTLOOP},
{"frames", GDK_DEBUG_FRAMES},
{"settings", GDK_DEBUG_SETTINGS},
+ {"nogl", GDK_DEBUG_NOGL},
{"opengl", GDK_DEBUG_OPENGL},
};
GDK_DEBUG_EVENTLOOP = 1 << 10,
GDK_DEBUG_FRAMES = 1 << 11,
GDK_DEBUG_SETTINGS = 1 << 12,
- GDK_DEBUG_OPENGL = 1 << 13
+ GDK_DEBUG_NOGL = 1 << 13,
+ GDK_DEBUG_OPENGL = 1 << 14
} GdkDebugFlag;
typedef enum {
GdkGLContext *
gdk_window_get_paint_gl_context (GdkWindow *window, GError **error)
{
+ if (_gdk_debug_flags & GDK_DEBUG_NOGL)
+ {
+ g_set_error_literal (error, GDK_GL_ERROR,
+ GDK_GL_ERROR_NOT_AVAILABLE,
+ _("GL support disabled via GDK_DEBUG"));
+ return NULL;
+ }
+
if (window->impl_window->gl_paint_context == NULL)
window->impl_window->gl_paint_context =
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->create_gl_context (window,